package com.bioroadlab.entity;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "t_gene", catalog = "captures")
public class Gene implements java.io.Serializable {

	private static final long serialVersionUID = 1L;
	private Integer sn;
	private String phenotypeOmimnumber;
	private String geneName;
	private String clinicalFeatures;
	private String inheritance;
	private String mapping;
	private String populationGenetics;
	private String molecularGenetics;
	private String contributors;
	private String creationDate;
	private String editHistory;
	private Set<References> TReferenceses = new HashSet<References>(0);
	private Set<Disease> TDiseases = new HashSet<Disease>(0);

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "sn", unique = true, nullable = false)
	public Integer getSn() {
		return this.sn;
	}

	public void setSn(Integer sn) {
		this.sn = sn;
	}

	@Column(name = "phenotypeOMIMnumber", length = 100)
	public String getPhenotypeOmimnumber() {
		return this.phenotypeOmimnumber;
	}

	public void setPhenotypeOmimnumber(String phenotypeOmimnumber) {
		this.phenotypeOmimnumber = phenotypeOmimnumber;
	}

	@Column(name = "geneName", length = 100)
	public String getGeneName() {
		return this.geneName;
	}

	public void setGeneName(String geneName) {
		this.geneName = geneName;
	}

	@Column(name = "clinicalFeatures", length = 65535)
	public String getClinicalFeatures() {
		return this.clinicalFeatures;
	}

	public void setClinicalFeatures(String clinicalFeatures) {
		this.clinicalFeatures = clinicalFeatures;
	}

	@Column(name = "inheritance", length = 65535)
	public String getInheritance() {
		return this.inheritance;
	}

	public void setInheritance(String inheritance) {
		this.inheritance = inheritance;
	}

	@Column(name = "mapping", length = 65535)
	public String getMapping() {
		return this.mapping;
	}

	public void setMapping(String mapping) {
		this.mapping = mapping;
	}

	@Column(name = "populationGenetics", length = 65535)
	public String getPopulationGenetics() {
		return this.populationGenetics;
	}

	public void setPopulationGenetics(String populationGenetics) {
		this.populationGenetics = populationGenetics;
	}

	@Column(name = "molecularGenetics", length = 65535)
	public String getMolecularGenetics() {
		return this.molecularGenetics;
	}

	public void setMolecularGenetics(String molecularGenetics) {
		this.molecularGenetics = molecularGenetics;
	}

	@Column(name = "contributors", length = 65535)
	public String getContributors() {
		return this.contributors;
	}

	public void setContributors(String contributors) {
		this.contributors = contributors;
	}

	@Column(name = "creationDate", length = 100)
	public String getCreationDate() {
		return this.creationDate;
	}

	public void setCreationDate(String creationDate) {
		this.creationDate = creationDate;
	}

	@Column(name = "editHistory", length = 65535)
	public String getEditHistory() {
		return this.editHistory;
	}

	public void setEditHistory(String editHistory) {
		this.editHistory = editHistory;
	}

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "TGene")
	public Set<References> getTReferenceses() {
		return this.TReferenceses;
	}

	public void setTReferenceses(Set<References> TReferenceses) {
		this.TReferenceses = TReferenceses;
	}

	@ManyToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	@JoinTable(name = "t_genediseaserel", catalog = "captures", joinColumns = { @JoinColumn(name = "t_gene_sn", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "t_disease_sn", nullable = false, updatable = false) })
	public Set<Disease> getTDiseases() {
		return this.TDiseases;
	}

	public void setTDiseases(Set<Disease> TDiseases) {
		this.TDiseases = TDiseases;
	}

}